<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Condominio - Cuota</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<meta http-equiv='Expires' content='Fri, Jun 12 1981 08:20:00 GMT'>
<meta http-equiv='Pragma' content='no-cache'>
<meta http-equiv='Cache-Control' content='no-cache'>
<link rel='stylesheet' href='css/styles.css' type='text/css'
	media='screen'>
<!--[if lte IE 6]><link rel='stylesheet' href='css/styles_ie.css' type='text/css' media='screen' >
<![endif]-->
<link rel='stylesheet' type='text/css' media='print'
	href='css/print.css'>
<link rel='shortcut icon' type='images/x-icon' href='pics/favicon.ico'>
<script type="text/javascript" src='lib/extjs/adapter/ext/ext-base.js'></script>
<script type='text/javascript' src='lib/extjs/ext-all.js'></script>
<link rel='stylesheet' type='text/css'
	href='lib/extjs/resources/css/ext-all.css' media='screen'>
<link rel='stylesheet' type='text/css'
	href='lib/extrajs/starslider/slider.css' media='screen'>
<script type='text/javascript' src='lib/tiny_mce/tiny_mce.js'></script>
<link rel='stylesheet' type='text/css' href='css/ext-all-glpi.css'
	media='screen'>
<script type='text/javascript' src='lib/extjs/locale/ext-lang-es.js'></script>

<script type='text/javascript' src='lib/extrajs/xdatefield.js'></script>
<script type='text/javascript' src='lib/extrajs/datetime.js'></script>
<script type='text/javascript' src='lib/extrajs/spancombobox.js'></script>
<script type='text/javascript' src='lib/extrajs/starslider/slider.js'></script>
<script type='text/javascript'>
	//          
	Ext.BLANK_IMAGE_URL = 'lib/extjs/s.gif';
	Ext.Updater.defaults.loadScripts = true;
	Ext.UpdateManager.defaults.indicatorText = '<\span class="loading-indicator center">Durante la carga...<\/span>';
	//
</script>
<!--[if IE]><script type='text/javascript'>
Ext.UpdateManager.defaults.indicatorText='<\span class="loading-indicator-ie">Durante la carga...<\/span>';
</script>
<![endif]-->
<script type='text/javascript' src='script.js'></script>
</head>
<body>
	<div id='header'>
		<div id='c_logo'>
			<a href='#' title="Inicio"></a>
		</div>
		<div id='c_preference'>
			<ul>
				<li id='deconnexion'><a href='#' title="Desconexi�n">Desconexi�n</a>
					(it)</li>
				<li><a href='#' target='_blank' title="Ayuda">Ayuda</a>
				</li>
				<li><a href='#' title="Preferencias">Preferencias</a>
				</li>
			</ul>
			<div class='sep'></div>
		</div>
		<div id='c_recherche'>
			<form method='get' action='#'>
				<div id='champRecherche'></div>
			</form>
			<div class='sep'></div>
		</div>

		<div id='c_menu'>
			<ul id='menu'>
				<li id='menu1' onmouseover="javascript:menuAff('menu1','menu');"><a
					href='Persona.html' class='itemP'>Usuario</a>
					<ul class='ssmenu'>
						<li><a href='front/computer.php'>Residente</a>
						</li>
					</ul></li>

				<li id='menu2' onmouseover="javascript:menuAff('menu2','menu');"><a
					href='vivienda.html' class='itemP'>Viviendas</a>
					<ul class='ssmenu'>
						<li><a href='front/ticket.php'>Vivienda</a>
						</li>
					</ul></li>

				<li id='menu3' onmouseover="javascript:menuAff('menu3','menu');"><a
					href='cuota.html' class='itemP'>Cuotas</a>
					<ul class='ssmenu'>
						<li><a href='front/budget.php'>Cuota</a>
						</li>
					</ul></li>

				<li id='menu4' onmouseover="javascript:menuAff('menu4','menu');"><a
					href='cuota_pendiente.html' class='itemP'>Pagos</a>
					<ul class='ssmenu'>
						<li><a href='front/budget.php'>Pago</a>
						</li>
					</ul></li>

				<li id='menu5' onmouseover="javascript:menuAff('menu5','menu');"><a
					href='Lista_morosos.html' class='itemP'>Mora</a>
					<ul class='ssmenu'>
						<li><a href='front/budget.php'>Mora</a>
						</li>
					</ul></li>

				<li id='menu6' onmouseover="javascript:menuAff('menu6','menu');"><a
					href='visita.html' class='itemP'>Visitas</a>
					<ul class='ssmenu'>
						<li><a href='front/budget.php'>Visitas</a>
						</li>
					</ul></li>

				<li id='menu7' onmouseover="javascript:menuAff('menu7','menu');"><a
					href='reserva.html' class='itemP'>Reserva</a>
					<ul class='ssmenu'>
						<li><a href='front/budget.php'>Servicios</a>
						</li>
					</ul></li>
			</ul>
			<div class='sep'></div>
		</div>

		<div id='c_ssmenu1'>
			<ul>
				<li><a href='#' accesskey='n'>Colocacion</a>
				</li>
				<li><a href='cuota_pendiente.html' accesskey='e'>Pendientes</a>
				</li>
				<li><a href='Lista_morosos.html' accesskey='t'>Morosos</a>
				</li>
			</ul>
		</div>

		<div id='c_ssmenu2'>
			<ul>
				<li><a href='#' title="Inicio">Inicio</a> ></li>
				<li><a href='#' class='here' title="Residentes">Cuotas</a>
				</li>
				<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
				<li><a href='#'><img src='pics/menu_add.png' alt="A�adir"
						border="0" title="A�adir">
				</a>
				</li>
				<li><a href='cuota_pendiente.html'><img
						src='pics/menu_search.png' title="Buscar" alt="Buscar">
				</a>
				</li>
			</ul>
		</div>
	</div>
	<div id='page'>
		<div id='tabspanel' class='center-h'></div>
		<script type='text/javascript'>
			var tabpanel = new Ext.TabPanel(
					{
						applyTo : 'tabspanel',
						width : 950,
						enableTabScroll : true,
						resizeTabs : false,
						collapsed : true,
						plain : true,
						items : [ {
							title : "Principal",
							id : '1',
							autoLoad : {
								url : 'ajax/supplier.tabs.php',
								scripts : true,
								nocache : true,
								params : 'target=front/supplier.form.php&itemtype=Supplier&glpi_tab=1&id='
							},
							listeners : { // Force glpi_tab storage
								beforeshow : function(panel) {
									/* clean content because append data instead of replace it : no more problem */
									/* Problem with IE6... But clean data for tabpanel before show. Do it on load default tab ?*/
									/*tabpanel.body.update('');*/
									/* update active tab*/
									Ext.Ajax
											.request({
												url : 'ajax/updatecurrenttab.php?itemtype=Supplier&glpi_tab=1',
												success : function(
														objServerResponse) {
													//alert(objServerResponse.responseText);
												}
											});
								}
							}
						} ]
					});/// Define view pointtabpanel.expand();// force first load
			function loadDefaultTab() {
				tabpanel.body = Ext.get('tabcontent');
				// See before
				tabpanel.body.update('');
				tabpanel.setActiveTab('1');
			}// force reload
			function reloadTab(add) {
				var tab = tabpanel.getActiveTab();
				var opt = tab.autoLoad;
				if (add) {
					if (opt.params)
						opt.params = opt.params + '&' + add;
					else
						opt.params = add;
				}
				tab.getUpdater().update(opt);
			}
		</script>

		<form name='form' method='post' action='front/supplier.form.php'>
			<input type='hidden' name='entities_id' value='0'>
			<div class='spaced' id='tabsbody'>
				<p>&nbsp;</p>
				<table width="92%" border='0' class='tab_cadrehov'>
					<tr class='tab_bg_2'>
						<th>Id Residente</th>
						<th>Nro Cuota</th>
						<th>Residente</th>
						<th>Vivienda</th>
						<th>Ao</th>
						<th>Mes</th>
						<th>Fecha Vencimiento</th>
						<th>Fecha Pago</th>
						<th>Importe</th>
						<th>Estado</th>						
					</tr>
					<%@page import="java.util.*, condominio.modelo.Cuota" %>
					<%
						Collection<Cuota> arreglo = (ArrayList<Cuota>)request.getAttribute("cuotas");
						if(arreglo != null) { 
							int i = 1;
							for(Cuota x : arreglo) {
					%>
					<tr class='tab_bg_1'>						
						<td valign='top'><% out.print(x.getVivienda().getResidente().getIdPersona()); %></td>
						<td valign='top'><% out.print(x.getNroCuotas()); %></td>
						<td valign='top'><% out.print(x.getVivienda().getResidente().getNombres() + " " +
													  x.getVivienda().getResidente().getApePat()  + " " +
													  x.getVivienda().getResidente().getApeMat()); 
										 %>
						</td>
					  <td valign='top'><% out.print(x.getVivienda().getIdVivienda()); %>
						<td valign='top'><% out.print(x.getAnio()); %></td>
						<td valign='top'><% out.print(x.getMes()); %></td>
					  <td valign='top'><% if (x.getFechaVen() != null){
												out.print(x.getFechaVen().substring(0,10));
											}else{
												out.print("");
											}												
										 %>
						</td>
						<td valign='top'><% if (x.getFechaPag() != null){
												out.print(x.getFechaPag().substring(0,10));										
											}else{
												out.print("");
											}						
										 %>
						</td>						
						<td valign='top'><div align="right">
						  <% out.print(String.valueOf(x.getMonto()));  %>
						  </div></td>
					  <td valign='top'><%	if (x.getStatus() != null){
												//out.print(x.getStatus());
												if (x.getStatus().equals("P")){
													out.print("Cancelado");
												}
												if (x.getStatus().equals("X")){
													out.print("Cancelado con Mora");
												}												
											}else{
												out.print("");					
											}
										 %>
						</td>
					</tr>
					<% }  
  							} %>					
				</table>
				
				<p>&nbsp;</p>
			</div>
		</form>
		<div id='tabcontent'>&nbsp;</div>
		<script type='text/javascript'>
			loadDefaultTab();
		</script>
	</div>
	<div id='footer'>
		<table width='100%'>
			<tr>
				<td class='left'><span class='copyright'>0.169s -
						5058056</span>
				</td>
				<td class='right'><a
					href='http://code.google.com/p/dew-incatron/'> <span
						class='copyright'>DEW- Proyecto de Condominios Copyright(C)
							2011-1 UPC Incatron Team .</span>
				</a></td>
			</tr>
		</table>
	</div>
</body>
</html>